9c90555e54ffae40919997d0bd2825ffd2751121,vertx-discovery-service/src/main/java/examples/Examples.java,Examples,example4,#DiscoveryService#,94
Before Change
}
});
service.getRecord(r -> r.getName().equals("some-name"), ar -> {
if (ar.succeeded()) {
if (ar.result() != null) {
// we have a record
} else {
// the lookup succeeded, but no matching service
}
} else {
// lookup failed
}
});
}
public void example5(DiscoveryService discovery, Record record) {
After Change
public void example4(DiscoveryService service) {
// Get any record
service.getRecord(r -> true, ar -> {
if (ar.succeeded()) {
if (ar.result() != null) {
// we have a record
} else {
// the lookup succeeded, but no matching service
}
} else {
// lookup failed
}
});
service.getRecord((JsonObject) null, ar -> {
if (ar.succeeded()) {